package com.epoint;

//import com.epoint.xmglspringbootstarterconfiguration.XmglProperties;
//import com.epoint.xmglspringbootstarterconfiguration.XmglService;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.ConfigurableApplicationContext;


@ServletComponentScan
@SpringBootApplication
//@MapperScan("com.epoint.mapper")
public class SpringBootApplicationStart {

    public static void main(String[] args) {

        ConfigurableApplicationContext run = SpringApplication.run(SpringBootApplicationStart.class, args);

//        // 我自己写了一个starter，但是必须要在自己主工程的application.yml里写配置，而不是starter里面的application.yml
//        XmglService bean = run.getBean(XmglService.class);
//
//        String xmglProjectInfo = bean.getXmglProjectInfo();
//        System.out.println(xmglProjectInfo);
//
//        XmglProperties bean1 = run.getBean(XmglProperties.class);
//        System.out.println(bean1);


//        JdbcTemplate jdbcTemplate = run.getBean(JdbcTemplate.class);
//        DataSource dataSource = run.getBean(DataSource.class);
//
//        System.out.println(dataSource.getClass());
//
//        List<Map<String, Object>> maps = jdbcTemplate.queryForList("select * from spc_inspection");
//
//        System.out.println(maps);


    }
}
